The rapidly growing database of completely sequenced genomes of bacteria, archaea and eukaryotes (approximately 27 genomes available by the end of 1999 and many more in progress) creates both new opportunities and new challenges for genome research. In order to take advantage of this information, we developed a system of Clusters of Orthologous Groups of proteins (COGs) from21 completely sequenced genomes. This database is being continuously updated to incorporate newly appearing genomes. The COG allows nearly automatic functional annotation of 60-80% of the proteins encoded in each of the tested bacterial and archaeal genomes, although only about 30% of the eukaryotic proteins fit into these groups. In addition to functional prediction, this approach provides for the systematic delineation of the set of ancient, conserved protein families that are missing in any particular genome. Examination of evolutionary patterns (i.e.representation of different species iand phylogenetic lineages)in the families of orthologs suggests a major role of horizontal gene transfer and lineage-specific gene loss in the evolution of prokaryotes. More specifically, we found evidence of massive horizontal gene among the archaea, between archaea and thermophilic bacteria and between bacterial parasites and therieukaryotic hosts. Comparative genomics has now become a part of any study on the evolution of a particular protein family or a functional system. Frequently examination of the phylogenetic distribution of structural domains and proteins with specific domain architectures provides for the possibility of detailed reconstructions of evolutionary scenarios. Such analyses were performed for the DNA repair systems of bacteria, archaea and eukaryotes and for the eukaryotic programmed cell death systems. Significant roles of horizontal gene transfer and multiple domain rearrangements in the evolution of both systems were demonstrated and a number of new functional predictions were made. - Complete genomes, orthologs, horizontal gene transfer, genome annotation